<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>AI交友 - 智能匹配</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome 图标 -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    
    <style>
        :root {
            --primary: #6366f1;
            --primary-light: #a5b4fc;
            --primary-dark: #4338ca;
            --secondary: #10b981;
            --accent: #f97316;
            --danger: #ef4444;
            --text-primary: #1f2937;
            --text-secondary: #6b7280;
            --text-light: #9ca3af;
            --bg-light: #f3f4f6;
            --bg-white: #ffffff;
            --border-light: #e5e7eb;
            --radius: 12px;
            --shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background-color: var(--bg-light);
            color: var(--text-primary);
            padding-top: 55px;
            padding-bottom: 70px;
        }
        
        /* 顶部导航 */
        .top-nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 55px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 15px;
            z-index: 1000;
            border-bottom: 1px solid var(--border-light);
            box-shadow: var(--shadow);
        }
        
        .nav-title {
            font-size: 1.15rem;
            font-weight: 600;
            color: var(--primary-dark);
        }
        
        .nav-action {
            color: var(--text-secondary);
            background: none;
            border: none;
            font-size: 1.2rem;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .nav-action:hover {
            background-color: var(--bg-light);
        }
        
        /* 搜索栏 */
        .search-container {
            padding: 12px 15px;
            background-color: var(--bg-white);
        }
        
        .search-group {
            position: relative;
        }
        
        .search-input {
            width: 100%;
            padding: 12px 15px 12px 45px;
            border-radius: 30px;
            border: 1px solid var(--border-light);
            background-color: var(--bg-light);
            font-size: 0.9rem;
        }
        
        .search-input:focus {
            outline: none;
            border-color: var(--primary-light);
            box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
        }
        
        .search-icon {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-secondary);
        }
        
        /* 筛选工具栏 */
        .filter-bar {
            display: flex;
            padding: 8px 15px;
            background-color: var(--bg-white);
            border-top: 1px solid var(--border-light);
            overflow-x: auto;
            scrollbar-width: none;
        }
        
        .filter-bar::-webkit-scrollbar {
            display: none;
        }
        
        .filter-item {
            white-space: nowrap;
            padding: 6px 14px;
            margin-right: 8px;
            border-radius: 20px;
            font-size: 0.85rem;
            background-color: var(--bg-light);
            color: var(--text-secondary);
            border: none;
        }
        
        .filter-item.active {
            background-color: var(--primary);
            color: white;
        }
        
        .filter-item i {
            margin-right: 5px;
        }
        
        /* AI交友列表 */
        .ai-list {
            padding: 0 15px;
        }
        
        .ai-card {
            background-color: var(--bg-white);
            border-radius: var(--radius);
            margin-top: 12px;
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: transform 0.2s ease;
        }
        
        .ai-card:hover {
            transform: translateY(-2px);
        }
        
        /* 无图AI卡片 */
        .ai-card.no-image .card-body {
            padding: 18px 15px;
        }
        
        /* 单图AI卡片 */
        .ai-card.single-image .card-image {
            height: 200px;
        }
        
        /* 多图AI卡片 */
        .card-image-container {
            position: relative;
        }
        
        .card-image {
            width: 100%;
            height: 160px;
            object-fit: cover;
        }
        
        .multi-image {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            grid-template-rows: repeat(2, 1fr);
            gap: 3px;
            height: 160px;
        }
        
        .multi-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .image-count {
            position: absolute;
            right: 8px;
            bottom: 8px;
            background-color: rgba(0, 0, 0, 0.6);
            color: white;
            font-size: 0.75rem;
            padding: 2px 8px;
            border-radius: 10px;
        }
        
        /* AI信息 */
        .card-body {
            padding: 15px;
        }
        
        .ai-header {
            display: flex;
            align-items: center;
            margin-bottom: 10px;
        }
        
        .ai-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid var(--primary-light);
        }
        
        .ai-info {
            margin-left: 12px;
            flex: 1;
        }
        
        .ai-name {
            font-weight: 600;
            font-size: 1rem;
            display: flex;
            align-items: center;
        }
        
        .ai-badge {
            background-color: rgba(99, 102, 241, 0.1);
            color: var(--primary);
            font-size: 0.7rem;
            padding: 1px 6px;
            border-radius: 4px;
            margin-left: 6px;
        }
        
        .ai-meta {
            font-size: 0.8rem;
            color: var(--text-light);
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 3px;
        }
        
        .ai-description {
            font-size: 0.9rem;
            line-height: 1.5;
            color: var(--text-primary);
            margin-bottom: 12px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        /* 兴趣标签 */
        .interests {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 12px;
        }
        
        .interest-tag {
            padding: 3px 10px;
            background-color: rgba(99, 102, 241, 0.1);
            color: var(--primary);
            border-radius: 12px;
            font-size: 0.75rem;
        }
        
        /* 匹配度 */
        .match-rate {
            display: flex;
            align-items: center;
            margin-bottom: 12px;
            font-size: 0.85rem;
        }
        
        .match-label {
            color: var(--text-secondary);
            margin-right: 8px;
        }
        
        .match-bar {
            flex: 1;
            height: 6px;
            background-color: var(--bg-light);
            border-radius: 3px;
            overflow: hidden;
        }
        
        .match-progress {
            height: 100%;
            background-color: var(--secondary);
            border-radius: 3px;
        }
        
        .match-percent {
            margin-left: 8px;
            font-weight: 500;
            color: var(--secondary);
        }
        
        /* 操作按钮 */
        .action-buttons {
            display: flex;
            gap: 10px;
        }
        
        .primary-btn {
            flex: 1;
            padding: 10px 0;
            background-color: var(--primary);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
        }
        
        .primary-btn:hover {
            background-color: var(--primary-dark);
        }
        
        .secondary-btn {
            flex: 1;
            padding: 10px 0;
            background-color: var(--bg-light);
            color: var(--text-secondary);
            border: none;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
        }
        
        .secondary-btn:hover {
            background-color: #e5e7eb;
        }
        
        /* 底部导航 */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 65px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-around;
            align-items: center;
            border-top: 1px solid var(--border-light);
            z-index: 1000;
        }
        
        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            color: var(--text-secondary);
            font-size: 0.7rem;
            text-decoration: none;
        }
        
        .nav-item i {
            font-size: 1.3rem;
            margin-bottom: 3px;
        }
        
        .nav-item.active {
            color: var(--primary);
        }
        
        .smart-match-btn {
            width: 55px;
            height: 55px;
            border-radius: 50%;
            background-color: var(--primary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.6rem;
            margin-top: -28px;
            box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
            border: 4px solid var(--bg-light);
        }
        
        /* 加载更多 */
        .load-more {
            width: 100%;
            padding: 10px;
            margin: 15px 0;
            background-color: var(--bg-white);
            border: 1px solid var(--border-light);
            border-radius: var(--radius);
            color: var(--text-secondary);
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        
        /* 骨架屏 */
        .skeleton {
            background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
            background-size: 200% 100%;
            animation: skeleton-loading 1.5s infinite;
        }
        
        @keyframes skeleton-loading {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }
        
        .skeleton-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
        }
        
        .skeleton-title {
            height: 18px;
            width: 120px;
            border-radius: 4px;
        }
        
        .skeleton-meta {
            height: 14px;
            width: 180px;
            margin-top: 8px;
            border-radius: 4px;
        }
        
        .skeleton-text {
            height: 14px;
            margin-top: 6px;
            border-radius: 4px;
        }
        
        .skeleton-text.short {
            width: 70%;
        }
        
        .skeleton-text.long {
            width: 100%;
        }
        
        .skeleton-tag {
            height: 22px;
            width: 60px;
            border-radius: 11px;
            display: inline-block;
            margin-right: 6px;
            margin-top: 6px;
        }
        
        .skeleton-bar {
            height: 6px;
            width: 100%;
            border-radius: 3px;
        }
        
        .skeleton-button {
            height: 40px;
            border-radius: 8px;
        }
    </style>
</head>
<body>
    <!-- 顶部导航 -->
    <div class="top-nav">
        <button class="nav-action">
            <i class="fas fa-cog"></i>
        </button>
        <div class="nav-title">AI智能匹配</div>
        <button class="nav-action">
            <i class="far fa-bell"></i>
        </button>
    </div>
    
    <!-- 搜索栏 -->
    <div class="search-container">
        <div class="search-group">
            <i class="fas fa-search search-icon"></i>
            <input type="text" class="search-input" placeholder="搜索AI伙伴、兴趣或标签...">
        </div>
    </div>
    
    <!-- 筛选工具栏 -->
    <div class="filter-bar">
        <button class="filter-item active">
            <i class="fas fa-fire"></i>推荐
        </button>
        <button class="filter-item">
            <i class="fas fa-star"></i>高匹配
        </button>
        <button class="filter-item">
            <i class="fas fa-clock"></i>最新
        </button>
        <button class="filter-item">
            <i class="fas fa-image"></i>有图
        </button>
        <button class="filter-item">
            <i class="fas fa-comment"></i>活跃
        </button>
        <button class="filter-item">
            <i class="fas fa-sliders-h"></i>更多
        </button>
    </div>
    
    <!-- AI交友列表 -->
    <div class="ai-list">
        <!-- 无图AI卡片 -->
        <div class="ai-card no-image">
            <div class="card-body">
                <div class="ai-header">
                    <img src="https://picsum.photos/id/1005/200/200" alt="AI头像" class="ai-avatar">
                    <div class="ai-info">
                        <div class="ai-name">
                            星辰AI
                            <span class="ai-badge">新上线</span>
                        </div>
                        <div class="ai-meta">
                            <span><i class="fas fa-robot"></i> 情感陪伴</span>
                            <span><i class="fas fa-map-marker-alt"></i> 虚拟位置</span>
                        </div>
                    </div>
                </div>
                
                <div class="ai-description">
                    我是一个专注于情感陪伴的AI伙伴，擅长倾听和提供情感支持。无论你是想聊天、分享心事还是寻求建议，我都会在这里陪伴你。
                </div>
                
                <div class="interests">
                    <span class="interest-tag">情感倾听</span>
                    <span class="interest-tag">心理咨询</span>
                    <span class="interest-tag">生活建议</span>
                    <span class="interest-tag">聊天陪伴</span>
                </div>
                
                <div class="match-rate">
                    <span class="match-label">匹配度</span>
                    <div class="match-bar">
                        <div class="match-progress" style="width: 87%"></div>
                    </div>
                    <span class="match-percent">87%</span>
                </div>
                
                <div class="action-buttons">
                    <button class="secondary-btn">
                        <i class="far fa-heart"></i> 收藏
                    </button>
                    <button class="primary-btn">
                        <i class="fas fa-comment"></i> 聊天
                    </button>
                </div>
            </div>
        </div>
        
        <!-- 单图AI卡片 -->
        <div class="ai-card single-image">
            <div class="card-image-container">
                <img src="https://picsum.photos/id/1035/800/400" alt="AI展示图" class="card-image">
            </div>
            <div class="card-body">
                <div class="ai-header">
                    <img src="https://picsum.photos/id/1012/200/200" alt="AI头像" class="ai-avatar">
                    <div class="ai-info">
                        <div class="ai-name">
                            旅行AI
                            <span class="ai-badge">热门</span>
                        </div>
                        <div class="ai-meta">
                            <span><i class="fas fa-robot"></i> 旅行顾问</span>
                            <span><i class="fas fa-users"></i> 1.2k互动</span>
                        </div>
                    </div>
                </div>
                
                <div class="ai-description">
                    专注于旅行规划和攻略的AI助手，能为你推荐最佳旅行路线、美食和景点，让你的旅程更加精彩。
                </div>
                
                <div class="interests">
                    <span class="interest-tag">旅行规划</span>
                    <span class="interest-tag">美食推荐</span>
                    <span class="interest-tag">景点攻略</span>
                    <span class="interest-tag">摄影</span>
                </div>
                
                <div class="match-rate">
                    <span class="match-label">匹配度</span>
                    <div class="match-bar">
                        <div class="match-progress" style="width: 76%"></div>
                    </div>
                    <span class="match-percent">76%</span>
                </div>
                
                <div class="action-buttons">
                    <button class="secondary-btn">
                        <i class="far fa-heart"></i> 收藏
                    </button>
                    <button class="primary-btn">
                        <i class="fas fa-comment"></i> 聊天
                    </button>
                </div>
            </div>
        </div>
        
        <!-- 多图AI卡片 -->
        <div class="ai-card multi-image-card">
            <div class="card-image-container">
                <div class="multi-image">
                    <img src="https://picsum.photos/id/292/400/400" alt="AI展示图1">
                    <img src="https://picsum.photos/id/431/400/400" alt="AI展示图2">
                    <img src="https://picsum.photos/id/488/400/400" alt="AI展示图3">
                    <img src="https://picsum.photos/id/312/400/400" alt="AI展示图4">
                </div>
                <div class="image-count">4图</div>
            </div>
            <div class="card-body">
                <div class="ai-header">
                    <img src="https://picsum.photos/id/1025/200/200" alt="AI头像" class="ai-avatar">
                    <div class="ai-info">
                        <div class="ai-name">美食AI</div>
                        <div class="ai-meta">
                            <span><i class="fas fa-robot"></i> 美食专家</span>
                            <span><i class="fas fa-users"></i> 3.5k互动</span>
                        </div>
                    </div>
                </div>
                
                <div class="ai-description">
                    热爱美食的AI伙伴，能为你推荐各地特色美食、分享食谱和烹饪技巧，一起探索美食的世界。
                </div>
                
                <div class="interests">
                    <span class="interest-tag">美食推荐</span>
                    <span class="interest-tag">食谱分享</span>
                    <span class="interest-tag">烹饪技巧</span>
                    <span class="interest-tag">餐厅测评</span>
                </div>
                
                <div class="match-rate">
                    <span class="match-label">匹配度</span>
                    <div class="match-bar">
                        <div class="match-progress" style="width: 92%"></div>
                    </div>
                    <span class="match-percent">92%</span>
                </div>
                
                <div class="action-buttons">
                    <button class="secondary-btn">
                        <i class="fas fa-heart"></i> 已收藏
                    </button>
                    <button class="primary-btn">
                        <i class="fas fa-comment"></i> 聊天
                    </button>
                </div>
            </div>
        </div>
        
        <!-- 无图AI卡片 -->
        <div class="ai-card no-image">
            <div class="card-body">
                <div class="ai-header">
                    <img src="https://picsum.photos/id/1074/200/200" alt="AI头像" class="ai-avatar">
                    <div class="ai-info">
                        <div class="ai-name">
                            音乐AI
                            <span class="ai-badge">精选</span>
                        </div>
                        <div class="ai-meta">
                            <span><i class="fas fa-robot"></i> 音乐达人</span>
                            <span><i class="fas fa-users"></i> 2.8k互动</span>
                        </div>
                    </div>
                </div>
                
                <div class="ai-description">
                    音乐爱好者的AI伙伴，精通各种音乐风格，能为你推荐符合口味的音乐，分享音乐知识和趣闻。
                </div>
                
                <div class="interests">
                    <span class="interest-tag">音乐推荐</span>
                    <span class="interest-tag">歌词解析</span>
                    <span class="interest-tag">音乐知识</span>
                    <span class="interest-tag">演唱会信息</span>
                </div>
                
                <div class="match-rate">
                    <span class="match-label">匹配度</span>
                    <div class="match-bar">
                        <div class="match-progress" style="width: 68%"></div>
                    </div>
                    <span class="match-percent">68%</span>
                </div>
                
                <div class="action-buttons">
                    <button class="secondary-btn">
                        <i class="far fa-heart"></i> 收藏
                    </button>
                    <button class="primary-btn">
                        <i class="fas fa-comment"></i> 聊天
                    </button>
                </div>
            </div>
        </div>
        
        <!-- 单图AI卡片 -->
        <div class="ai-card single-image">
            <div class="card-image-container">
                <img src="https://picsum.photos/id/180/800/400" alt="AI展示图" class="card-image">
            </div>
            <div class="card-body">
                <div class="ai-header">
                    <img src="https://picsum.photos/id/1066/200/200" alt="AI头像" class="ai-avatar">
                    <div class="ai-info">
                        <div class="ai-name">阅读AI</div>
                        <div class="ai-meta">
                            <span><i class="fas fa-robot"></i> 文学爱好者</span>
                            <span><i class="fas fa-users"></i> 980互动</span>
                        </div>
                    </div>
                </div>
                
                <div class="ai-description">
                    热爱阅读的AI伙伴，能为你推荐好书、讨论书中情节和人物，分享阅读心得和文学知识。
                </div>
                
                <div class="interests">
                    <span class="interest-tag">书籍推荐</span>
                    <span class="interest-tag">文学讨论</span>
                    <span class="interest-tag">阅读心得</span>
                    <span class="interest-tag">写作技巧</span>
                </div>
                
                <div class="match-rate">
                    <span class="match-label">匹配度</span>
                    <div class="match-bar">
                        <div class="match-progress" style="width: 81%"></div>
                    </div>
                    <span class="match-percent">81%</span>
                </div>
                
                <div class="action-buttons">
                    <button class="secondary-btn">
                        <i class="far fa-heart"></i> 收藏
                    </button>
                    <button class="primary-btn">
                        <i class="fas fa-comment"></i> 聊天
                    </button>
                </div>
            </div>
        </div>
        
        <!-- 加载更多 -->
        <button class="load-more">
            <i class="fas fa-spinner fa-spin"></i>
            <span>加载更多AI伙伴</span>
        </button>
    </div>
    
    <!-- 底部导航 -->
    <div class="bottom-nav">
        <a href="#" class="nav-item active">
            <i class="fas fa-home"></i>
            <span>首页</span>
        </a>
        <a href="#" class="nav-item">
            <i class="fas fa-compass"></i>
            <span>发现</span>
        </a>
        <button class="smart-match-btn">
            <i class="fas fa-magic"></i>
        </button>
        <a href="#" class="nav-item">
            <i class="far fa-comment"></i>
            <span>消息</span>
        </a>
        <a href="#" class="nav-item">
            <i class="far fa-user"></i>
            <span>我的</span>
        </a>
    </div>
    
    <!-- Bootstrap JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        // 筛选按钮切换
        const filterItems = document.querySelectorAll('.filter-item');
        filterItems.forEach(item => {
            item.addEventListener('click', () => {
                filterItems.forEach(i => i.classList.remove('active'));
                item.classList.add('active');
                
                // 模拟筛选加载
                const aiList = document.querySelector('.ai-list');
                const originalContent = aiList.innerHTML;
                
                // 显示骨架屏
                aiList.innerHTML = `
                    <div class="ai-card no-image">
                        <div class="card-body">
                            <div class="ai-header">
                                <div class="skeleton skeleton-avatar"></div>
                                <div class="ai-info">
                                    <div class="skeleton skeleton-title"></div>
                                    <div class="skeleton skeleton-meta"></div>
                                </div>
                            </div>
                            <div class="skeleton skeleton-text long"></div>
                            <div class="skeleton skeleton-text short"></div>
                            <div style="margin: 10px 0;">
                                <div class="skeleton skeleton-tag"></div>
                                <div class="skeleton skeleton-tag"></div>
                                <div class="skeleton skeleton-tag"></div>
                            </div>
                            <div class="match-rate" style="margin: 10px 0;">
                                <span class="match-label">匹配度</span>
                                <div class="match-bar">
                                    <div class="skeleton skeleton-bar"></div>
                                </div>
                                <span class="match-percent">--%</span>
                            </div>
                            <div class="action-buttons">
                                <div class="skeleton skeleton-button" style="flex: 1;"></div>
                                <div class="skeleton skeleton-button" style="flex: 1; margin-left: 10px;"></div>
                            </div>
                        </div>
                    </div>
                    <div class="ai-card single-image">
                        <div class="card-image-container">
                            <div class="skeleton" style="width: 100%; height: 200px;"></div>
                        </div>
                        <div class="card-body">
                            <div class="ai-header">
                                <div class="skeleton skeleton-avatar"></div>
                                <div class="ai-info">
                                    <div class="skeleton skeleton-title"></div>
                                    <div class="skeleton skeleton-meta"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                `;
                
                // 模拟加载延迟
                setTimeout(() => {
                    aiList.innerHTML = originalContent;
                    bindEvents();
                }, 1500);
            });
        });
        
        // 收藏功能
        function bindEvents() {
            const favoriteButtons = document.querySelectorAll('.secondary-btn');
            favoriteButtons.forEach(btn => {
                if (btn.querySelector('.fa-heart')) {
                    btn.addEventListener('click', () => {
                        const icon = btn.querySelector('i');
                        
                        if (icon.classList.contains('far')) {
                            icon.classList.remove('far');
                            icon.classList.add('fas');
                            btn.innerHTML = '<i class="fas fa-heart"></i> 已收藏';
                            showToast('收藏成功');
                        } else {
                            icon.classList.remove('fas');
                            icon.classList.add('far');
                            btn.innerHTML = '<i class="far fa-heart"></i> 收藏';
                            showToast('取消收藏');
                        }
                    });
                }
            });
            
            // 聊天按钮
            const chatButtons = document.querySelectorAll('.primary-btn');
            chatButtons.forEach(btn => {
                if (btn.querySelector('.fa-comment')) {
                    btn.addEventListener('click', () => {
                        const aiName = btn.closest('.ai-card').querySelector('.ai-name').textContent.trim();
                        showToast(`正在打开与${aiName}的聊天窗口`);
                        // 实际应用中这里会跳转到聊天页面
                    });
                }
            });
            
            // 智能匹配按钮
            document.querySelector('.smart-match-btn').addEventListener('click', () => {
                showToast('正在为你智能匹配最合适的AI伙伴...');
                // 实际应用中这里会触发智能匹配算法
            });
            
            // 加载更多
            document.querySelector('.load-more').addEventListener('click', function() {
                const btn = this;
                const originalText = btn.innerHTML;
                btn.innerHTML = '<i class="fas fa-spinner fa-spin"></i><span>加载中...</span>';
                btn.disabled = true;
                
                // 模拟加载延迟
                setTimeout(() => {
                    btn.innerHTML = originalText;
                    btn.disabled = false;
                    
                    // 复制最后两个AI卡片并修改内容
                    const aiList = document.querySelector('.ai-list');
                    const lastCards = Array.from(aiList.querySelectorAll('.ai-card')).slice(-2);
                    
                    lastCards.forEach(card => {
                        const clone = card.cloneNode(true);
                        // 修改一些内容以示区别
                        const randomId = Math.floor(Math.random() * 100) + 200;
                        clone.querySelector('.ai-avatar').src = `https://picsum.photos/id/${randomId}/200/200`;
                        
                        // 修改匹配度
                        const matchPercent = Math.floor(Math.random() * 30) + 60;
                        clone.querySelector('.match-progress').style.width = `${matchPercent}%`;
                        clone.querySelector('.match-percent').textContent = `${matchPercent}%`;
                        
                        // 移除收藏状态
                        const favoriteBtn = clone.querySelector('.secondary-btn');
                        if (favoriteBtn.querySelector('.fas.fa-heart')) {
                            favoriteBtn.innerHTML = '<i class="far fa-heart"></i> 收藏';
                        }
                        
                        aiList.insertBefore(clone, btn);
                    });
                    
                    bindEvents();
                }, 1500);
            });
        }
        
        // 提示消息
        function showToast(message) {
            // 检查是否已有toast
            let toast = document.querySelector('.toast-notification');
            if (toast) {
                toast.remove();
            }
            
            // 创建新toast
            toast = document.createElement('div');
            toast.className = 'toast-notification';
            toast.style.position = 'fixed';
            toast.style.bottom = '80px';
            toast.style.left = '50%';
            toast.style.transform = 'translateX(-50%)';
            toast.style.backgroundColor = 'rgba(0, 0, 0, 0.7)';
            toast.style.color = 'white';
            toast.style.padding = '8px 16px';
            toast.style.borderRadius = '4px';
            toast.style.zIndex = '9999';
            toast.style.fontSize = '0.9rem';
            toast.textContent = message;
            
            document.body.appendChild(toast);
            
            // 3秒后移除
            setTimeout(() => {
                toast.style.opacity = '0';
                toast.style.transition = 'opacity 0.3s ease';
                setTimeout(() => toast.remove(), 300);
            }, 3000);
        }
        
        // 初始化绑定事件
        bindEvents();
    </script>
</body>
</html>

